Ext.namespace("Task.AssignMain");

Task.AssignMain.panel = function() {

	var flag="";
		 //访问action
	 var conn = new Ext.data.Connection({
	    url:'../security/checkMenu.form?timesnap=' + Date.parse(new Date()),
	    method:'post'
	 });
	 var param={menuName:"xxxh"};
	  //alert(Ext.util.JSON.encode(param));  
		 Utils.request(conn,{
		    params:param,
		    scope:this,
		    success:function(data){
		     if(data.access=="true"){
		      flag="true"
					this.tabPanel = new Ext.TabPanel({
						region:'center'
					});
					if(!Task.Assign.panel.instance)
						Task.Assign.panel.instance = new Task.Assign.panel();
					this.tabPanel.add(Task.Assign.panel.instance);
					this.tabPanel.activate(Task.Assign.panel.instance);
					if(!Task.Sended.panel.instance)
						Task.Sended.panel.instance = new Task.Sended.panel();
					this.tabPanel.add(Task.Sended.panel.instance);
					if(!Task.FeedBack.panel.instance)
						Task.FeedBack.panel.instance = new Task.FeedBack.panel();
					this.tabPanel.add(Task.FeedBack.panel.instance);
					
				/*	if(!Task.Back.panel.instance)
						Task.Back.panel.instance = new Task.Back.panel();
					this.tabPanel.add(Task.Back.panel.instance);*/
					
					
					var mainview = new Ext.Viewport({
				        layout:'border',
				        items:[this.tabPanel]
				    });
					Ext.extend(Task.AssignMain.panel, Ext.Viewport, {

					});
		 }else{
	      flag="false"
	      alert("没有权限");
	      return;
	     }
	
	    }
	  });		
	}			
				



Ext.onReady(function() {
    Ext.QuickTips.init();
    Ext.BLANK_IMAGE_URL = '../resources/images/default/s.gif';
   	Task.AssignMain.panel.instance = new Task.AssignMain.panel();
   
});

